package com.sumer.proxy;

/**
 * 代理类
 */
public class StaticProxy implements TestImpl {

    private TestImpl testImpl;

    public StaticProxy(TestImpl test) {
        this.testImpl = test;
    }

    @Override
    public void test() {
        before();
        this.testImpl.test();
        after();
    }

    private void before() {
        System.out.println("前置方法");
    }

    private void after() {
        System.out.println("后置方法");
    }
}
